package com.cis.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cis.education.mapper.EduCourseTeacherMapper;
import com.cis.education.domain.EduCourseTeacher;
import com.cis.education.service.IEduCourseTeacherService;
import com.cis.common.core.text.Convert;

/**
 * 教师和课程关联Service业务层处理
 * 
 * @author 管理员
 * @date 2022-01-12
 */
@Service
public class EduCourseTeacherServiceImpl implements IEduCourseTeacherService 
{
    @Autowired
    private EduCourseTeacherMapper eduCourseTeacherMapper;

    /**
     * 查询教师和课程关联
     * 
     * @param courseId 教师和课程关联主键
     * @return 教师和课程关联
     */
    @Override
    public EduCourseTeacher selectEduCourseTeacherByCourseId(Integer courseId)
    {
        return eduCourseTeacherMapper.selectEduCourseTeacherByCourseId(courseId);
    }

    /**
     * 查询教师和课程关联列表
     * 
     * @param eduCourseTeacher 教师和课程关联
     * @return 教师和课程关联
     */
    @Override
    public List<EduCourseTeacher> selectEduCourseTeacherList(EduCourseTeacher eduCourseTeacher)
    {
        return eduCourseTeacherMapper.selectEduCourseTeacherList(eduCourseTeacher);
    }

    /**
     * 新增教师和课程关联
     * 
     * @param eduCourseTeacher 教师和课程关联
     * @return 结果
     */
    @Override
    public int insertEduCourseTeacher(EduCourseTeacher eduCourseTeacher)
    {
        return eduCourseTeacherMapper.insertEduCourseTeacher(eduCourseTeacher);
    }

    /**
     * 修改教师和课程关联
     * 
     * @param eduCourseTeacher 教师和课程关联
     * @return 结果
     */
    @Override
    public int updateEduCourseTeacher(EduCourseTeacher eduCourseTeacher)
    {
        return eduCourseTeacherMapper.updateEduCourseTeacher(eduCourseTeacher);
    }

    /**
     * 批量删除教师和课程关联
     * 
     * @param courseIds 需要删除的教师和课程关联主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseTeacherByCourseIds(String courseIds)
    {
        return eduCourseTeacherMapper.deleteEduCourseTeacherByCourseIds(Convert.toStrArray(courseIds));
    }

    /**
     * 删除教师和课程关联信息
     * 
     * @param courseId 教师和课程关联主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseTeacherByCourseId(Integer courseId)
    {
        return eduCourseTeacherMapper.deleteEduCourseTeacherByCourseId(courseId);
    }
}
